import n from 'eslint-plugin-n'
import { FlatConfig, OptionsOverrides } from '../types'

export default async ({ overrides = {} }: OptionsOverrides = {}): Promise<FlatConfig[]> => [
  {
    name: 'vill-v/n',
    plugins: {
      n,
    },
    rules: {
      'n/no-callback-literal': 'off',
      'n/no-new-require': 'error',
      'n/no-path-concat': 'error',
      'n/prefer-global/buffer': 'error',
      'n/prefer-global/process': 'error',
      'n/prefer-global/console': 'error',
      ...overrides,
    },
  },
]
